import * as events from './events'

const mutations = {
  [events.TEST_EVENT]: function(state, data) {
    state.test = data
  },
  [events.CHANGE_LAWYER_INFO]: function(state, lawyerLoginData) {
    state.lawyerLoginData = lawyerLoginData
    state.isLawyerLogin = true
  },
  [events.CHANGE_LAWFIRM_INFO]: function(state, lawfirmLoginData) {
    state.lawfirmLoginData = lawfirmLoginData
    state.isLawfirmLogin = true
  },
  [events.USER_LOGIN_OUT]: function(state) {
    state.lawyerLoginData = {}
    state.lawfirmLoginData = {}
    state.isLawyerLogin = false
    state.isLawfirmLogin = false
  },
  [events.FIRM_PHOTO_CHANGE]: function(state, url) {
    state.lawfirmLoginData.lawfirmLicense = url
  }
}
export default mutations
